﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MS.InformationManagement.Presenter.Support;

namespace MS.InformationManagement.Presenter.IBusquedaPrestamosDocumentalesView
{
    public class BusquedaPrestamosDocumentalesPresenter : BasePresenter<IBusquedaPrestamosDocumentalesView>
    {
        #region Properties

        public BusquedaPrestamosDocumentalesPresenter(IBusquedaPrestamosDocumentalesView view) : base(view) { }

        #endregion

        public void BuscarRadicado()
        {
            int totalRecords;
            View.RadicadosResult = MS.InformationManagement.BLL.BusquedaPrestamosDocumentales.BusquedaPrestamosDocumentales.SearchInLibrary(View.SearchId, View.GuidCurrentList, View.PageIndex, View.PageSize, out totalRecords).Where(x => x.Owner == false).ToList();
            View.RadicadosOwner = MS.InformationManagement.BLL.BusquedaPrestamosDocumentales.BusquedaPrestamosDocumentales.SearchInLibrary(View.SearchId, View.GuidCurrentList, View.PageIndex, View.PageSize, out totalRecords).Where(x => x.Owner == true).ToList();
            View.TotalRecords = totalRecords;
            View.Success();
        }
    }
}
